package com.it.myd.help;

import java.util.MissingResourceException;
import java.util.ResourceBundle;

public class ResourceProp {

    private static final String BUNDLE_NAME = "resource";

    private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
            .getBundle(BUNDLE_NAME);

    private ResourceProp() {
    }

    public static String getString(String key) {
        try {
            return RESOURCE_BUNDLE.getString(key);
        } catch (MissingResourceException e) {
            return '!' + key + '!';
        }
    }


    public static String ecode(String s) throws Exception {
        String retstr = new String(s.getBytes("ISO-8859-1") ,"UTF-8");
        return retstr;
    }
}
